<?php
require_once("lib/auth/session.php");
require_once("lib/auth/user.php");
require_once("lib/api.php");

$api = new api();

//change or maybe getprofile info such as email,username

//TODO need validation
if (loggedIn()) {
    $api->setOK();
    $api->setReturn("name",getName());
} else {
    $api->setFail();
}

$api->returnResponse();
?>